

const initialState = {
    text: '10'
}
export const reducer = (state = initialState, action) => {
    switch (action.type) {
        case 'ADD':
            return {
                text: Number(state.text)+1
            }
        case 'DEL':
            return {
                text: Number(state.text)-1
            }
        default:
            return initialState;
    }
}
